﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Xml.Serialization;

namespace ServiciosProductos
{
    // NOTA: puede usar el comando "Rename" del menú "Refactorizar" para cambiar el nombre de interfaz "IServiceCreaciones" en el código y en el archivo de configuración a la vez.
    [ServiceContract]
    [XmlSerializerFormat]
    public interface IServiceCreaciones
    {
        [OperationContract]
        long putProductInterop(ProductCreate product);

        [OperationContract]
        Boolean deleteProducto(long idProducto);

        [OperationContract]
        Boolean updateProducto(ProductCreate product);
    }

    [DataContract]
    public class ProductCreate
    {
        [XmlElement(IsNullable = false)]
        [DataMember]
        public long ProductId { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public string Name { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public string Show { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public DateTime ShowDate { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public string CityId { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public DateTime ArrivalDate { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public DateTime DepartureDate { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public long TransportationRateId { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public long ShowRateId { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public long AccommodationRateId { get; set; }
        [XmlElement(IsNullable = false)]
        [DataMember]
        public string Image { get; set; }
        /*public long productId;
        public string name;
        public string show;
        public DateTime showDate;
        public string cityId;
        public DateTime arrivalDate;
        public DateTime departureDate;
        public long transportationRateId;
        public long showRateId;
        public long accommodationRateId;
        public string image;

        [DataMember]
        public long ProductId
        {
            get { return productId; }
            set { productId = value; }
        }

        [XmlElement(IsNullable = false)]
        [DataMember]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        [DataMember(Order = 0, IsRequired = true)]
        public string Show
        {
            get { return show; }
            set { show = value; }
        }

        [DataMember]
        public DateTime ShowDate
        {
            get { return showDate; }
            set { showDate = value; }
        }

        [DataMember(Order = 0, IsRequired = true)]
        public string CityId
        {
            get { return cityId; }
            set { cityId = value; }
        }

        [DataMember]
        public DateTime ArrivalDate
        {
            get { return arrivalDate; }
            set { arrivalDate = value; }
        }

        [DataMember]
        public DateTime DepartureDate
        {
            get { return departureDate; }
            set { departureDate = value; }
        }

        [DataMember]
        public long TransportationRateId
        {
            get { return transportationRateId; }
            set { transportationRateId = value; }
        }

        [DataMember]
        public long ShowRateId
        {
            get { return showRateId; }
            set { showRateId = value; }
        }

        [DataMember]
        public long AccommodationRateId
        {
            get { return accommodationRateId; }
            set { accommodationRateId = value; }
        }

        [DataMember(Order = 0, IsRequired = true)]
        public string Image
        {
            get { return image; }
            set { image = value; }
        }*/
    }
}
